import mysql.connector

conn = mysql.connector.connect(user='root', password='Pass@word',
                               host='localhost', port='3306',
                               database='python', use_unicode=True)
c = conn.cursor()
c.execute('select * from user_tb where user_id>%s ', (2,))
for col in (c.description):
    print(col[0], end='\t')
print("\n----------------------")
for row in c:
    print(row)
c.close()
conn.close()
